/* eslint-disable prettier/prettier */
import { defHttp } from "@/utils/http";
export interface DeptVO {
	pageNo?: string;
	pageSize?: string;
}
//查询科室列表
export function deptList() {
	return defHttp.get({ url: "/system/dept/list" });
}
//查询患者基本信息
export function patientInfo(patCardno: string, id: string) {
	const params = {
		patCardno: patCardno,
		id: id
	};
	return defHttp.get({ url: "/his/th-patients/get", params });
}

//查询全部药物列表page
export function medicinePage() {
	return defHttp.get({ url: `/whs/inventory/page` });
}

//患者用药信息page
export function patientsList() {
	return defHttp.get({ url: "his/treatment-phm/page" });
}

//添加患者用药信息
export function addPatMedicine(data: any) {
	return defHttp.post({ url: "/his/treatment-phm/create", data });
}

//删除患者用药信息
export function delPatMedicine(id: any) {
	return defHttp.delete({ url: `/his/treatment-phm/delete?id=` + id });
}

// 5.03 查询表格
export function outPatientsPage() {
	return defHttp.get({ url: "his/opm-outpatients/pagenew" });
}

//5.04 查询表格
export function medicalRecordStatusPage() {
	return defHttp.get({ url: "his/medical/record/page" });
}

//5.10人物信息回显
export function deathGuyInfo(patId: string) {
	const params = {
		patId: patId
	};
	return defHttp.get({ url: "his/medical/record/first", params });
}
//5.10 创建患者死亡报告信息
export function addDeathGuy(data: any) {
	return defHttp.post({ url: "/his/pat-death/create", data });
}
//5.10 创建医院诊断记录
export function addDeathGuyDiagnosis(data: any) {
	return defHttp.post({ url: "/his/TH-diagnosis/create", data });
}
//5.10 批量新增患者负责人员
export function addDeathGuyStaffs(data: any) {
	return defHttp.post({ url: "/his/pat-staffs/batch/create", data });
}

//5.14.01 查询
export function pageDiagnosisPatients() {
	return defHttp.get({ url: "his/opm-outpatients/pagenew" });
}
//5.14.02 查询
export function pageDischargePatients() {
	return defHttp.get({ url: "his/TH-ipm-discharges/page" });
}

//bank301 page
export function pageCustomers() {
	return defHttp.get({ url: "his/customers/page" });
}

//bank302 添加
export function addCustomers(data: any) {
	return defHttp.post({ url: "/his/customers/create", data });
}
// hrms EM
export function pageEmployee(params: Recordable) {
	return defHttp.get({ url: "/hrms/th-staffs/page", params });
}
export function addEmployee(params: Recordable) {
	return defHttp.post({ url: "/hrms/th-staffs/create", params });
}
export function updateEmployee(params: Recordable) {
	return defHttp.put({ url: "/hrms/th-staffs/update", params });
}
export function delEmployee(id: any) {
	return defHttp.delete({ url: `/hrms/th-staffs/delete?id=` + id });
}
//hrms PM
//获取所有职务 显示在左侧
export function getPost() {
	return defHttp.get({ url: "/hrms/hrm-jobpoz/page" });
}
// //展示该职务下的所有员工
export function pagePost(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-staffs/page", params });
}
// 添加职务名称
export function addPost(params: Recordable) {
	return defHttp.post({ url: "/hrms/hrm-jobpoz/create", params });
}
export function updatePost(params: Recordable) {
	return defHttp.put({ url: "/hrms/hrm-jobpoz/update", params });
}
export function delPost(id: any) {
	return defHttp.delete({ url: `/hrms/hrm-jobpoz/delete?id=` + id });
}

// 报销表
export function pageReimbursement(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-reimb/page", params });
}
export function addReimbursement(params: Recordable) {
	return defHttp.post({ url: "/hrms/hrm-reimb/create", params });
}
export function updateReimbursement(params: Recordable) {
	return defHttp.put({ url: "/hrms/hrm-reimb/update", params });
}
export function delReimbursement(id: any) {
	return defHttp.delete({ url: `/hrms/hrm-reimb/delete?id=` + id });
}
// 薪酬
export function pageSalary(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-salaries/page", params });
}
export function addSalary(params: Recordable) {
	return defHttp.post({ url: "/hrms/hrm-salaries/create", params });
}
export function updateSalary(params: Recordable) {
	return defHttp.put({ url: "/hrms/hrm-salaries/update", params });
}
export function delSalary(id: any) {
	return defHttp.delete({ url: `/hrms/hrm-salaries/delete?id=` + id });
}

// 考勤
export function pageAttendance(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-wkattends/page", params });
}
export function addAttendance(params: Recordable) {
	return defHttp.post({ url: "/hrms/hrm-wkattends/create", params });
}
export function updateAttendance(params: Recordable) {
	return defHttp.put({ url: "/hrms/hrm-wkattends/update", params });
}
export function delAttendance(id: any) {
	return defHttp.delete({ url: `/hrms/hrm-wkattends/delete?id=` + id });
}
//请假
export function pageLeave(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-wkleaves/page", params });
}
export function getLeave(params: Recordable) {
	return defHttp.get({ url: "/hrms/hrm-wkleaves/get", params });
}
export function addLeave(params: Recordable) {
	return defHttp.post({ url: "/hrms/hrm-wkleaves/create", params });
}
export function updateLeave(params: Recordable) {
	return defHttp.put({ url: "/hrms/hrm-wkleaves/update", params });
}
export function delLeave(id: any) {
	return defHttp.delete({ url: `/hrms/hrm-wkleaves/delete?id=` + id });
}
//打卡
export function pagePunch(params: Recordable) {
	return defHttp.get({ url: "/hrms/staff-lockin/page", params });
}
export function addPunch(params: Recordable) {
	return defHttp.post({ url: "/hrms/staff-lockin/create", params });
}
export function updatePunch(params: Recordable) {
	return defHttp.put({ url: "/hrms/staff-lockin/update", params });
}
export function delPunch(id: any) {
	return defHttp.delete({ url: `/hrms/staff-lockin/delete?id=` + id });
}
